package com.bdqn.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.crm.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 登录
     * @param usrName
     * @return
     */
    SysUser getlogin(@Param("usrName") String usrName);

    /**
     * 分页查找系统用户
     * @param usrName
     * @param roleId
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<SysUser> lists(@Param("usrName") String usrName,@Param("roleId") Long roleId,
                              @Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    /**
     * 根据id获取数据
     * @param usrId
     * @return
     */
    SysUser getUser(@Param("usrId") Long usrId);

    /**
     * 根据id删除
     * @param usrId
     * @return
     */
    boolean delUser(@Param("usrId") Long usrId);
}
